package com.example.attendancesystem_1_8.backendInterface;

import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.file.Paths;

public class Main
{
    public static void main(String[] args) throws UnsupportedEncodingException {
        String filePath="D:/FireFox/双人照.jpg";


        Base64Trans bt = new Base64Trans();
        String encodingString = bt.base64Encoding(bt.readFile(Paths.get(filePath)));

        encodingString= URLEncoder.encode(encodingString,"UTF-8");
        System.out.println(encodingString);


        String ans=HttpRequest.sendPost("http://47.96.144.238:8080/face/number",encodingString);
        System.out.println("共有"+ans+"个人头");

    }
}
